chore: migrate Lingui v5 to v6#200
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
📝 Walkthrough概要Lingui 依存関係を v5.9.5 から v6.0.1 にアップグレードし、フォーマッター設定、ビルド設定、マクロインポートパターンを新バージョンに対応させた。 変更内容Lingui v6.0.1 アップグレード
推定レビュー工数🎯 2 (Simple) | ⏱️ ~10 分 兎の詩
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Bump @lingui/{core,react,message-utils,cli,vite-plugin,babel-plugin-lingui-macro} to ^6.0.1
- Add @lingui/format-po (required by v6 config formatter API)
- Remove deprecated @lingui/macro and babel-plugin-macros (project already
uses @lingui/babel-plugin-lingui-macro directly via vite-plugins.ts)
- Update lingui.config.ts to use formatter() instead of string "po"
- Update SearchField.tsx imports to @lingui/core/macro + @lingui/react/macro
- Update waku.config.ts ssr.noExternal / optimizeDeps.include to drop
removed @lingui/macro / babel-plugin-macros references
- Regenerate message catalogs (URL-safe Base64 IDs per v6 spec)
Verified: typecheck, lint, unit tests (1012), frontend & backend build.
f5f1ecf to
92d0930
Compare
Summary / 概要
Migrate
@lingui/*from 5.9.5 to 6.0.1 following the official v6 migration guide.Type of Change / 変更の種類
Changes / 変更内容
Package updates
@lingui/core^5.9.5^6.0.1@lingui/react^5.9.5^6.0.1@lingui/message-utils^5.9.5^6.0.1@lingui/cli^5.9.5^6.0.1@lingui/vite-plugin^5.9.5^6.0.1@lingui/babel-plugin-lingui-macro^5.9.5^6.0.1@lingui/format-po^6.0.1(new, required by formatter API)@lingui/macro^5.9.5babel-plugin-macros^3.1.0@lingui/babel-plugin-lingui-macrodirectly)Code changes
lingui.config.ts—format: "po"→format: formatter()using@lingui/format-po.src/components/ui/SearchField.tsx— sole remaining@lingui/macroimport switched to@lingui/core/macro(fort) +@lingui/react/macro(forTrans), matching the rest of the codebase.waku.config.ts—ssr.noExternalandoptimizeDeps.includelists no longer reference removed@lingui/macro/babel-plugin-macros.lingui extract && lingui compile:.pofiles: only source-line-number drift + a handful of new strings already missing inja(25 untranslated)..tscompiled catalogs: message IDs migrated to URL-safe Base64 (+→-,/→_, no=) per v6 spec.Test Plan / テスト計画
bun run typecheckpasses (backend + frontend)bun run lintpasses (0 warnings, 0 errors)bun run test:unitpasses (1012 tests)bun run build:frontendsucceeds (lingui compile + waku build + SSG)bun run build:backendsucceedsNotes for reviewers
.po(msgid is the source string) and the compiled.tsis rebuilt deterministically.Summary by CodeRabbit
リリースノート